<template>
  <div>
    <FormPanel ref="from" :list="formList" @formChange="changeHandle" :isSubmitBtn="false" :collapse="false" labelWidth="110" />

    <BreakSpace label="合格证信息" />;
    <FilterTable ref="table" :columns="columns" :fetchapi="fetchApi" :params="fetchParams" :datakey="'records'" :onColumnsChange="columns => (this.columns = columns)"> </FilterTable>
    <div style="height:47px;"></div>

    <div
      :style="{
        position: 'absolute',
        left: 0,
        bottom: 0,
        right: 0,
        zIndex: 9,
        borderTop: '1px solid #e9e9e9',
        padding: '10px 20px',
        background: '#fff',
        textAlign: 'right'
      }"
    >
      <el-button @click="closeDrawer(1)">关 闭</el-button>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      formList: this.createdFrom(),
      issearch: false,
      fetchApi: () => {},
      fetchParams: {},
      columns: this.createdTable()
    };
  },
  components: {},
  methods: {
    createdFrom() {
      return [
        {
          type: 'BREAK_SPACE',
          label: '邮寄地址'
        },
        {
          type: 'INPUT',
          label: '经销商代码',
          fieldName: 'jxsdm',
          disabled: true,
          placeholder: '请输入'
        },
        {
          type: 'INPUT',
          label: '经销商名称',
          fieldName: 'jxsmc',
          disabled: true,
          placeholder: '请输入'
        },
        {
          type: 'INPUT',
          label: '金融机构',
          fieldName: 'jrjg',
          disabled: true,
          placeholder: '请输入'
        },
        {
          type: 'INPUT',
          label: '邮寄人',
          fieldName: 'yjr',
          disabled: true,
          placeholder: '请输入'
        },
        {
          type: 'DATE',
          label: '快递时间',
          fieldName: 'kdsj',
          disabled: true,
          placeholder: '请选择'
        },
        {
          type: 'INPUT',
          label: '收件人',
          fieldName: 'sjr',
          disabled: true,
          placeholder: '请输入'
        },
        {
          type: 'INPUT',
          label: '收件人电话',
          fieldName: 'sjrdh',
          disabled: true,
          selfCols: 2,
          placeholder: '请输入'
        },
        {
          type: 'INPUT',
          label: '快递单号',
          fieldName: 'kddh',
          disabled: true,
          placeholder: '请输入',
          rules: [{ required: true, message: '请输入', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: '快递公司',
          fieldName: 'kdgs',
          disabled: true,
          placeholder: '请输入',
          rules: [{ required: true, message: '请输入', trigger: 'blur' }]
        }
      ];
    },
    createdTable() {
      return [
        {
          title: '序号',
          dataIndex: 'index',
          width: 80,
          sorter: true,
          fixed: 'left',
          render: props => {
            return <span>{props.row.index + 1}</span>;
          }
        },

        {
          title: '销售订单号',
          dataIndex: 'xsddh',
          sorter: true,
          filter: true,
          filterType: 'input',
          align: 'center',
          width: 200
        },
        {
          title: 'VIN码',
          dataIndex: 'vin',
          align: 'center',
          width: 180,
          sorter: true,
          filter: true,
          filterType: 'input'
        },
        {
          title: '合格证号',
          dataIndex: 'hgzh',
          sorter: true,
          filter: true,
          filterType: 'input'
        },
        {
          title: '资金类型',
          dataIndex: 'zjlx',
          sorter: true,
          filter: true,
          filterType: 'input'
        },
        {
          title: '三方票号',
          dataIndex: 'sfph',
          sorter: true,
          filter: true,
          filterType: 'input'
        },
        {
          title: '产品名称',
          dataIndex: 'cpmc',
          sorter: true,
          filter: true,
          filterType: 'input'
        }
      ];
    },
    seacherFun() {
      this.issearch = true;
    },
    editHandle(data) {},
    changeHandle(val) {},
    closeDrawer(type) {}
  }
};
</script>
